--- db-5.3.21.org/dist/configure	2012-09-29 19:57:08.668000002 +0000
+++ db-5.3.21/dist/configure	2012-09-29 20:10:28.304000001 +0000
@@ -21387,7 +21387,7 @@
 	# x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#include <stdlib.h>
 int
 main ()
 {
@@ -22458,7 +22458,7 @@
 if test "$db_cv_atomic" = no; then
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#include <stdlib.h>
 int
 main ()
 {
@@ -23433,6 +23433,7 @@
 /* end confdefs.h.  */
 
 #include <sys/time.h>
+#include <time.h>
 int
 main ()
 {
@@ -24191,7 +24192,9 @@
 		if test "$cross_compiling" = yes; then :
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 int
 main ()
 {
@@ -24302,6 +24305,8 @@
     /* Not all these includes are needed, but the minimal set varies from
      * system to system.
      */
+    #include <stdlib.h>
+    #include <unistd.h>
     #include <stdio.h>
     #include <string.h>
     #include <sys/types.h>
